package cn.dataling.dag.listener;

import cn.dataling.dag.pojo.DagWorkflow;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class DefaultDagWorkflowListener implements DagWorkflowListener {

    private static final Logger LOGGER = LoggerFactory.getLogger(DefaultDagWorkflowListener.class);

    @Override
    public void onStart(DagWorkflow dagWorkflow) {
        LOGGER.info("{} {} 开始执行", dagWorkflow.getId(), dagWorkflow.getName());
    }

    @Override
    public void onCompleted(DagWorkflow dagWorkflow) {
        LOGGER.info("{} {} 执行完成", dagWorkflow.getId(), dagWorkflow.getName());
    }

    @Override
    public void onPaused(DagWorkflow dagWorkflow) {
        LOGGER.info("{} {} 执行暂停", dagWorkflow.getId(), dagWorkflow.getName());
    }

    @Override
    public void onProceed(DagWorkflow dagWorkflow) {
        LOGGER.info("{} {} 执行恢复", dagWorkflow.getId(), dagWorkflow.getName());
    }
}
